<script setup lang="ts">
import { RouterView, useRouter } from 'vue-router'
import { onMounted } from 'vue'

const router = useRouter()

onMounted(() => {
  // 监听来自主进程的导航事件
  window.electron.ipcRenderer.on('navigate', (_event, path) => {
    router.push(path)
  })
})
</script>

<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<style scoped lang="sass">
#app
  height: 100vh
  width: 100vw
  overflow: hidden
</style>
